package com.biz.primus.ms.oms.dao.po;

import com.biz.primus.ms.base.jpa.po.BaseEntity;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 收货人信息
 *
 * @author yanweijin
 * @date 2017/10/19
 */
@Data
@Entity
@Table(name = "oms_consignee", indexes = {
		@Index(name = "idx_order_id",columnList = "orderId")
})
public class OmsConsignee extends BaseEntity{

	@Column(length = 20)
	private String name;

	@Column(length = 20)
	private String mobile;

	@Column(length = 100)
	private String address;

	private Long provinceId;

	private Long cityId;

	private Long districtId;

	@Column(nullable = false)
	private Long orderId;

	/**
	 * 修改收货人信息时,不会删除原有记录,而是新增一条记录
	 * 新增记录时,要填写本字段来为本次修改做备注
	 */
	@Column(length = 200)
	private String modifyRemark;

	/**
	 * 修改收货人信息操作人
	 */
	private String operator;

	/**
	 * 纬度
	 */
	@Column(scale = 6)
	private BigDecimal lat;

	/**
	 * 经度
	 */
	@Column(scale = 6)
	private BigDecimal lon;


	/**
	 * 收货人邮箱
	 */
	@Column(scale = 50)
	private String email;

	/**
	 * 邮编
	 */
	@Column(scale = 50)
	private String postcode;

	@Column(scale = 50)
	private String provinceText;

	@Column(scale = 50)
	private String cityText;

	@Column(scale = 50)
	private String districtText;
}
